#ifndef XMPPCONNECTIONSTORE_H
#define XMPPCONNECTIONSTORE_H
#include <QObject>
#include <QMap>
#include "../handlers.h"

class QString;

namespace Kajim
{
namespace XMPP
{

class Connection;

class ConnectionStore : public QObject
{
    Q_OBJECT
public:
    static ConnectionStore * instance();

    /**
     * @brief Get connection for specified account
     * @param h
     * @return pointer to Connection object for given account or 0 if account doesn't exist.
     */
    Connection * accountConnection(int h);

private:
    ConnectionStore(QObject *parent = 0);
    static ConnectionStore * inst;
    QMap<int, Connection*> connections;
};

}
}
#endif
